package mspbots.next.ticket.core.data.rules;

import com.fasterxml.jackson.databind.JsonNode;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.domain.Persistable;
import org.springframework.data.relational.core.mapping.Table;

/**
 * mspbots.next.ticket.core.data.rules.RulesTemplate
 *
 * @author <a href="https://github.com/vnobo">Alex bob</a>
 * @date Created by 2020/12/15
 */
@Data
@Table("next_ticket_rules_templates")
public class RulesTemplate implements Persistable<Integer> {

    @Id
    private Integer id;
    private String name;
    private String displayName;
    private Boolean enable;
    private JsonNode params;
    private JsonNode template;

    @Override
    public boolean isNew() {
        return this.id == 0;
    }
}
